<template>
  <div class="logo">
    <router-link :to="{ name: 'dashboard' }">
      <img v-if="sidebar || device === 'mobile'" :src="$store.state.user.logoPic | imgURLFilter" alt="logo" />
      <img v-else :src="$store.state.user.iconPic | imgURLFilter" alt="logo" />
    </router-link>
  </div>
</template>

<script>
import { mapActions, mapGetters } from 'vuex';
export default {
  name: 'Logo',
  props: {
    title: {
      type: String,
      default: 'Ant Design Pro',
      required: false
    },
    showTitle: {
      type: Boolean,
      default: true,
      required: false
    }
  },
  computed: {
    ...mapGetters(['device', 'sidebar'])
  }
};
</script>
